#!/src/bin/perl -w
$filename = $ARGV[0];
chomp($filename);
open (FileInput, $filename)||die "Can't open file";
$nbre_mots = 0;
while ($line = <FileInput>) 
{
	@liste_mots = split(/ /,$line);
	$nbre_mots = $nbre_mots + $#liste_mots + 1;
}
print "Le nombre de mots de ce fichier est: ".$nbre_mots."\n";
close(FileInput); 